﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EventReminder.Common;

namespace EventReminder.Server
{
    class MeetingProcessor : AEventProcessor
    {
        EventManager em = new EventManager();
        
        public MeetingProcessor()
            : base(EventTypes.Meeting)
        { }

        //public MeetingProcessor(EventTypes handles)
        //    : base (handles)
        //{ }

        //public MeetingProcessor(EventTypes handles, IEventProcessor nextInChain)
        //    : base(handles, nextInChain)
        //{ }

        protected override void ProcessAddEvent(EventData data)
        {
            // handle adding a meeting
            //EventManager em = new EventManager();

            em.AddNewEvent(data);
        }

        protected override void ProcessModifyEvent(EventData oldVersion, EventData newVersion)
        {
            // handle modifying a meeting
            em.ModifyEvent(oldVersion, newVersion);
        }

        protected override void ProcessDeleteEvent(EventData data)
        {
            // handle deleting a meeting
            em.DeleteEvent(data);
        }
    }
}
